package com.zhuang.decorator;

/**
 * @Classname Egg
 * @Description  鸡蛋配料类 继承配料类
 * @Date 2021/3/23 21:55
 * @Created by dell
 */

public class Egg extends Garnish {

    public Egg(FastFood fastFood) {
        //鸡蛋1元
        super(fastFood, 1, "鸡蛋");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
